package com.prpat;

import java.util.LinkedList;

public class PendingContainer {

	private static LinkedList<Range> container;

	public static void create(){
		container = new LinkedList<Range>();
	}

	public static void insert(Message mes){
		synchronized(container){
			if(!container.contains(mes.range))
				container.add(mes.range);
		}
	}

	public static void extract(Range key){
		synchronized(container){
			container.remove(key);
		}
	}


	public static LinkedList<Range> toList(){
		return container;
	}

	public static boolean isEmpty(){
		return container.isEmpty();
	}


}
